Integrand size = 33, antiderivative size = 136 \[ \int \sqrt {b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=-\frac {2 b B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 (3 A+C) \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{3 d}+\frac {2 B \sqrt {b \sec (c+d x)} \sin (c+d x)}{d}+\frac {2 C \sqrt {b \sec (c+d x)} \tan (c+d x)}{3 d} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {4132, 3853, 3856, 2719, 4131, 2720} \[ \int \sqrt {b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 (3 A+C) \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{3 d}+\frac {2 B \sin (c+d x) \sqrt {b \sec (c+d x)}}{d}-\frac {2 b B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 C \tan (c+d x) \sqrt {b \sec (c+d x)}}{3 d} \]
[In]
[Out]
Rule 2719
Rule 2720
Rule 3853
Rule 3856
Rule 4131
Rule 4132
Rubi steps \begin{align*} \text {integral}& = \frac {B \int (b \sec (c+d x))^{3/2} \, dx}{b}+\int \sqrt {b \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx \\ & = \frac {2 B \sqrt {b \sec (c+d x)} \sin (c+d x)}{d}+\frac {2 C \sqrt {b \sec (c+d x)} \tan (c+d x)}{3 d}-(b B) \int \frac {1}{\sqrt {b \sec (c+d x)}} \, dx+\frac {1}{3} (3 A+C) \int \sqrt {b \sec (c+d x)} \, dx \\ & = \frac {2 B \sqrt {b \sec (c+d x)} \sin (c+d x)}{d}+\frac {2 C \sqrt {b \sec (c+d x)} \tan (c+d x)}{3 d}-\frac {(b B) \int \sqrt {\cos (c+d x)} \, dx}{\sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {1}{3} \left ((3 A+C) \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx \\ & = -\frac {2 b B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 (3 A+C) \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{3 d}+\frac {2 B \sqrt {b \sec (c+d x)} \sin (c+d x)}{d}+\frac {2 C \sqrt {b \sec (c+d x)} \tan (c+d x)}{3 d} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 2.20 (sec) , antiderivative size = 302, normalized size of antiderivative = 2.22 \[ \int \sqrt {b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {4 \sqrt {b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (-\frac {i \sqrt {2} e^{-i (c+d x)} \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \left (3 B \left (1+e^{2 i (c+d x)}\right )+3 B \left (-1+e^{2 i c}\right ) \sqrt {1+e^{2 i (c+d x)}} \operatorname {Hypergeometric2F1}\left (-\frac {1}{4},\frac {1}{2},\frac {3}{4},-e^{2 i (c+d x)}\right )+(3 A+C) e^{i (c+d x)} \left (-1+e^{2 i c}\right ) \sqrt {1+e^{2 i (c+d x)}} \operatorname {Hypergeometric2F1}\left (\frac {1}{4},\frac {1}{2},\frac {5}{4},-e^{2 i (c+d x)}\right )\right )}{-1+e^{2 i c}}+\sqrt {\sec (c+d x)} (3 B \cos (d x) \csc (c)+C \tan (c+d x))\right )}{3 d (A+2 C+2 B \cos (c+d x)+A \cos (2 (c+d x))) \sec ^{\frac {5}{2}}(c+d x)} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 1.53 (sec) , antiderivative size = 611, normalized size of antiderivative = 4.49
method | result | size |
parts | \(-\frac {2 i A \left (\cos \left (d x +c \right )+1\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {b \sec \left (d x +c \right )}}{d}+\frac {2 B \left (i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \cos \left (d x +c \right )^{2}-i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \cos \left (d x +c \right )^{2}+2 i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \cos \left (d x +c \right )-2 i \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \cos \left (d x +c \right )+i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )-i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )+\sin \left (d x +c \right )\right ) \sqrt {b \sec \left (d x +c \right )}}{d \left (\cos \left (d x +c \right )+1\right )}-\frac {2 C \sqrt {b \sec \left (d x +c \right )}\, \left (i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \cos \left (d x +c \right )+i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )-\tan \left (d x +c \right )\right )}{3 d}\) | \(611\) |
default | \(\text {Expression too large to display}\) | \(782\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.09 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.42 \[ \int \sqrt {b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {\sqrt {2} {\left (-3 i \, A - i \, C\right )} \sqrt {b} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + \sqrt {2} {\left (3 i \, A + i \, C\right )} \sqrt {b} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 3 i \, \sqrt {2} B \sqrt {b} \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 3 i \, \sqrt {2} B \sqrt {b} \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + 2 \, {\left (3 \, B \cos \left (d x + c\right ) + C\right )} \sqrt {\frac {b}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{3 \, d \cos \left (d x + c\right )} \]
[In]
[Out]
\[ \int \sqrt {b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \sqrt {b \sec {\left (c + d x \right )}} \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right )\, dx \]
[In]
[Out]
\[ \int \sqrt {b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \sqrt {b \sec \left (d x + c\right )} \,d x } \]
[In]
[Out]
\[ \int \sqrt {b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \sqrt {b \sec \left (d x + c\right )} \,d x } \]
[In]
[Out]
Timed out. \[ \int \sqrt {b \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \sqrt {\frac {b}{\cos \left (c+d\,x\right )}}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right ) \,d x \]
[In]
[Out]